package ai.people.netmon.framework.domain.system.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * 系统角色用户
 *
 * @author yuanqinglong
 * @date 2022/3/22 11:39
 */
@Data
@TableName(value = "nm_sys_role_user")
public class NmSystemRoleUser {

    /**
     * id
     * @mock 123
     * @ignore
     */
    @TableId
    @Null(message = "id非法")
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long id;

    /**
     * 角色id
     * @mock 123
     */
    @NotNull(message = "角色id为空")
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long roleId;

    /**
     * 用户id
     * @mock 123
     */
    @NotNull(message = "用户id为空")
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long userId;
}
